# -*- coding: utf-8 -*-
# @Time    : 2021/4/18 0018 13:10
# @Author  : 蒋才果
# @Email   : 1476235300@qq.com
# @File    : 第一个重复的字符.py
# @Software: PyCharm
def func_re(str):
    ls = list()
    for i in str:
        if i in ls:
            return i
        ls.append(i)
        print(ls)

str = 'abcabc'
print(func_re(str))